import {defineConfig} from 'vite';
import type { UserConfig} from "vite";
import vue from '@vitejs/plugin-vue';
import legacy from '@vitejs/plugin-legacy';
import vueJsx from '@vitejs/plugin-vue-jsx';
import {resolve} from "path";

const BasicConfig:UserConfig =  {
    resolve: {
        alias: {
            '@': resolve(__dirname,"..",'src') //把src改为@
        }
},
plugins: [
    vueJsx({}),
],
    css: {
    preprocessorOptions: {
        less: {
            modifyVars: {
                'primary-color': '#1DA57A',
                    'link-color': '#1DA57A',
                    'border-radius-base': '2px',
            },
            javascriptEnabled: true
        }
    }
},
}

// https://vitejs.dev/config/
export default defineConfig(BasicConfig)
